#include<iostream>
using namespace std;

const int N = 1e5 + 10;
typedef long long ll;
ll arr[N];
ll n, m;
ll fun(int x)
{
	ll ret = 0;
	for (int i = 1; i <= n; i++)
	{
		ret += (arr[i] / x);
	}
	return ret;
}
int main()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++)
	{
		cin >> arr[i];
	}
	ll l = 0, r = 1e9;
	while (l < r)
	{
		ll mid = l + (r - l + 1) / 2;
		if (fun(mid) >= m) l = mid;
		else r = mid - 1;
	}
	cout << l;
	return 0;
}